import request from '@/utils/request'
import { Link } from '@/types/link'

/**
 * 获取link
 * @returns
 */
export const queryLinkList = (): ResponseResult<Array<Link>> =>
  request({
    url: `${import.meta.env.VITE_APP_BASE_API}/link/list`,
    method: 'GET'
  })
/**
 * 新增link
 * @returns
 */
export const saveLink = (data: Link): ResponseDefault =>
  request({
    url: `${import.meta.env.VITE_APP_BASE_API}/link/save`,
    method: 'POST',
    data
  })
